<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv=content-type content="text/html; charset=UTF-8" />
	<title></title>

	<meta name="description" content="" />
	<meta name="keywords" content="" />
	<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
	<link rel="shortcut icon" href="/static/icon/favicon.ico" />
	<link rel="stylesheet" href="/static/css/index.css" type="text/css" media="screen" charset="utf-8" />
	<script type="text/javascript">var WEB_ROOT = '';</script>
	<script type="text/javascript">var LOGINUID= 2;</script>
	<script src="/static/js/index.js" type="text/javascript"></script>
	<script src="/static/js/kindeditor/kindeditor.js" type="text/javascript"></script>
	</head>

<body>


<style>
	.window-table{padding:10px;font-size:14px}
	.window-table tr{height:35px}
	input{height:25px;line-height:25px;}
</style>
<form method="post" action="/diy/keyword.php" enctype="multipart/form-data">
	<table border=0 width=100% class="window-table">
		<tr>
			<td width=100px align="right">关键词：</td>
			<td><input type="text" name="keyword" /><span style="font-size:11px;color:#666">（多个关键字，请以半角逗号","隔开，例如：你好,hello,您好）</span></td>
		</tr>
		<tr>
			<td align="right">回答方式：</td>
			<td>
				<select name="type" onchange="change_type(this.value);">
					<option value="text">文本模式</option>
					<option value="news">图文模式</option>
					<!--<option value="newses">多图文模式</option>-->
				</select>
			</td>
		</tr>
	</table>
	<hr />
	<!--// 文本模式 -->
	<p style="margin-left:40px" id="text_p">
		<script>KindEditor.ready(function(K){window.editor = K.create('#text_content');});</script>
		<textarea name="text_content" id="text_content" style="width:550px"></textarea>
	</p>


	<!--// 图文模式 -->
	<p style="margin-left:40px;display:none" id="news_p">
		标题：<input type="text" name="news_title" style="margin-bottom:10px;width:400px" /><br />
		封面：<input type="file" name="news_img" style="margin-bottom:10px" /><br />
		正文：<br />
		<script>
			var options = {
				filterMode : true,
				items : [
					'emoticons','link', 'unlink',
					'source', 'insertorderedlist', 'insertunorderedlist', 
					'forecolor', 'hilitecolor', 'bold',
					'italic', 'underline', '|', 'image', 'multiimage',
					'|', 'undo', 'redo', '|', 'clearhtml', 'removeformat',
				],
			};
			KindEditor.ready(function(K){
				window.editor = K.create('#news_content', options);
			});
		</script>
		<textarea name="news_content" id="news_content" style="width:550px"></textarea><br />
		链接：<input type="text" name="news_url" style="margin-bottom:10px;width:400px" />
	</p>


	<p style="margin-left:40px">
		<input type="submit" name="sub_keyword" value="提交" style="width:100px;height:35px;background:#2D710C;color:#fff;margin-top:15px" />
	</p>
</form>

<script>
	function change_type(type){
		if(type == 'text'){
			document.getElementById('news_p').style.display='none';
			document.getElementById('text_p').style.display='block';
		}else if(type == 'news'){
			document.getElementById('news_p').style.display='block';
			document.getElementById('text_p').style.display='none';
		}
	}
</script>


</body>
</html>